package com.d2rv.offscreen;

import codeanticode.glgraphics.GLGraphicsOffScreen;
import processing.core.PApplet;

/**
 * This abstract class of the offsreen 2D
 *
 * @author Darrieutort A., Dupouy A., Rossignol L., Van Poucke A.
 */
public abstract class OffScreen2D extends GLGraphicsOffScreen {

    /**
     * Default constructor.
     * 
     * @param parent the current application
     * @param width  the width of the offscreen
     * @param height the height of the offscreen
     */
    public OffScreen2D(PApplet parent, int width, int height) {
        super(parent, width, height);
    }

    /**
     * abstract methode to draw the offscreen 2D
     */
    public abstract void draw();

    /**
     * Calls the show method the offscreen 2d
     * 
     * @param parent the current application
     * @param x the x coordinate of the left corner of the offscreen
     * @param y the y coordinate of the left corner of the offscreen
     */
    public abstract void show(PApplet parent, int x, int y);
}